/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.mahumLogs.comparators;

import com.mahumLogs.backedbeans.Domain;
import java.util.Comparator;

/**
 *
 * @author Kalast
 */
public class DomainComparator implements Comparator<Domain>{
    
    /**
     * Compare deux domaines
     * @param o1
     * @param o2
     * @return 
     */
    @Override
    public int compare(Domain o1, Domain o2) {
        if(o1.count < o2.count){
            return -1;
        } 
        else if(o1.count > o2.count) {
            return 1;
        } 
        else {
            return 0;
        }
    }
}
